package com.pureut.equipment.api.factory;


import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.equipment.api.FeignEquipmentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * @author: CM
 * @date: 2023/5/6  11:19
 */
public class RemoteEquipmentFallbackFactory implements FallbackFactory<FeignEquipmentService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteEquipmentFallbackFactory.class);


    @Override
    public FeignEquipmentService create(Throwable cause) {
        log.error("设备服务:{}", cause.getMessage());

        return new FeignEquipmentService() {

            @Override
            public AjaxResult getDeviceCondition(String lineCode) {
                return null;
            }

            @Override
            public AjaxResult getDeviceInfo(String deviceCode) {
                return null;
            }

            @Override
            public AjaxResult updateMaintenanceStatusByTime() {
                return null;
            }

            @Override
            public AjaxResult updateInspectionStatusByTime() {
                return null;
            }

            @Override
            public AjaxResult updatePatrolStatusByTime() {
                return null;
            }

            @Override
            public void generationWorkOrder() {

            }
        };
    }
}